<template>
  <el-button
    type="primary"
    class="tx-button-add"
    @click="click()"
    v-if="$showAuthElement()"
  >
   <div style="display:flex; justify-content:center;align-items:center;">
     <img class="img"
      :src="imgUrl"/>
    <div>{{ name }}</div>
   </div>
    </el-button
  >
</template>

<script>
export default {
  props: {
    name: {
      type: String,
      default: '新增'
    },
    imgUrl: {
      type: [String, Number],
      default:require('@/assets/TeamAdministrator/btn-Import.png')
    }
  },

  methods: {
    click() {
      this.$emit('click')
    }
  }
}
</script>
<style lang="scss">
.tx-button-add {
  // min-width: 118px;
  // line-height: 32px;
  // height: 32px;
  background: #38c2c6;
  border: 1px solid #38c2c6;
  border-radius: 4px;
  .img {
    width: 15px;
    height: 15px;
    margin-right: 3px;
    background-repeat:no-repeat;
      background-size:100%;
  }
}
</style>
